home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 61 / Quick PC 61.iso / I386 / WMS.CAB / LoggingAdmin.asp < prev    next >
Encoding:
Text File  |  2003-02-21  |  43.9 KB  |  1,182 lines

  1. ∩╗┐<%@ Language=VBScript CODEPAGE=65001 %>
  2. <!--#include file="include/wmsLocStrings.inc"-->
  3. <!--#include file="include/wmsServerHash.inc"-->
  4. <!--#include file="include/wmsPlugins.inc"-->
  5. <!--#include file="include/wmsHeader.inc"-->
  6. <!--#include file="include/wmsPageBanner.inc"-->
  7. <!--#include file="include/wmsError.inc"-->
  8. <!--#include file="plugin_loading.inc"-->
  9. <%
  10. '+-------------------------------------------------------------------------
  11. '
  12. '  Microsoft Windows Media
  13. '  Copyright (C) Microsoft Corporation. All rights reserved.
  14. '
  15. '  File:       LoggingAdmin.asp
  16. '
  17. '  Contents:
  18. '
  19. '--------------------------------------------------------------------------
  20.  
  21. ConnectToPlugin
  22. ConnectToPluginAdmin
  23.  
  24. BeginErrorHandling
  25.  
  26. on error resume next
  27.  
  28. 'WMS_LOG_CYCLE_TYPE
  29. Const WMS_LOG_CYCLE_NONE = 0
  30. Const WMS_LOG_CYCLE_SIZE = 1
  31. Const WMS_LOG_CYCLE_MONTH = 2
  32. Const WMS_LOG_CYCLE_WEEK = 3
  33. Const WMS_LOG_CYCLE_DAY = 4
  34. Const WMS_LOG_CYCLE_HOUR = 5
  35.  
  36. 'WMS_LOG_EVENT_TYPE
  37. Const WMS_LOG_EVENT_NONE = 0
  38. Const WMS_LOG_EVENT_PLAYER = 1
  39. Const WMS_LOG_EVENT_DISTRIBUTION = 2
  40. Const WMS_LOG_EVENT_LOCAL = 4
  41. Const WMS_LOG_EVENT_REMOTE = 8
  42. Const WMS_LOG_EVENT_FILTER_ON_ROLE = 16
  43.  
  44. Dim i
  45. Dim dwVerifyPathComparison
  46. dwVerifyPathComparison = 1
  47. Dim dwLoggedEvents
  48. Dim dwNewLoggedEvents
  49. Dim bRequestClientLogs
  50. Dim bRequestRemClientLogs
  51. Dim bSavePlayerLog
  52. Dim bSaveDistLog
  53. Dim bUseRole
  54. Dim bCycleTheLogFile
  55. Dim strTemplate
  56. Dim strExpandedTemplate
  57.  
  58. dwTabIndex = 1
  59.  
  60. dwLoggedEvents = 0
  61. bRequestClientLogs = FALSE
  62. bRequestRemClientLogs = FALSE
  63. bSavePlayerLog = FALSE
  64. bSaveDistLog = FALSE
  65. bUseRole = FALSE
  66. bCycleTheLogFile = FALSE
  67.  
  68. Dim strOp
  69. strOp = RemoveDangerousCharacters( GetFormStr( "formHistory" ) )
  70.  
  71. on error resume next
  72.  
  73. Dim strRole
  74. if 0 < Len( GetFormStr( "role") ) then
  75.     strRole = Server.HTMLEncode( GetFormStr( "role" ) )
  76. else
  77.     strRole = Server.HTMLEncode( g_objPluginAdmin.RoleFilter )
  78. end if 
  79.  
  80. if ( 0 < Len( GetFormStr( "cycle" ) ) ) then
  81.  
  82.     g_objPluginAdmin.CycleNow
  83.  
  84. elseif( 0 < Len( GetFormStr( "ok" ) ) ) then
  85.  
  86.     Err.Clear
  87.     Session( "ErrorNumber" ) = 0
  88.     Session( "ErrorDescription" ) = ""
  89.     
  90.     ' use a do-while-false structure to break out upon first error
  91.     do
  92.         strTemplate = RemoveSpecifiedChars( Left( GetFormStr("LogFileTemplate"), MAX_PATH ), REGEXP_ILLEGAL_TEMPL_CHARS )
  93.         ClearError
  94.         if( 0 <> StrComp( strTemplate, g_objPluginAdmin.Template, vbTextCompare ) ) then
  95.             err.Clear
  96.             
  97.             Dim bIsValidTemplate
  98.             strExpandedTemplate = g_objPluginAdmin.ExpandTemplate( strTemplate )
  99.             if( 0 = Len( strExpandedTemplate ) ) then
  100.                 if( 0 < Len( strTemplate ) ) then
  101.                     err.Raise -1
  102.                     err.description = RemoveDangerousCharacters( L_INVALIDLOGPATH_TEXT )
  103.                 end if
  104.             end if
  105.             if( 0 = err.number ) then
  106.                 bIsValidTemplate = g_objPluginAdmin.IsPathValid( strExpandedTemplate )
  107.                 if( bIsValidTemplate ) then
  108.                     g_objPluginAdmin.Template = CStr( strTemplate )
  109.                 else
  110.                     err.Raise -1
  111.                     err.description = RemoveDangerousCharacters( L_INVALIDLOGPATH_TEXT )
  112.                 end if
  113.             end if
  114.             if ErrorDetected( "template" ) then
  115.                 Exit Do
  116.             end if
  117.         end if
  118.  
  119.         Dim dwNewTimeInterval
  120.         Dim dwNewFileSize
  121.         Dim bUseBuffering
  122.         Dim bUseUnicode
  123.         Dim strLogCache
  124.         Dim strEncoding
  125.         strLocCache = RemoveDangerousCharacters( GetFormStr( "logcache" ) )
  126.         strEncoding = RemoveDangerousCharacters( GetFormStr( "encoding" ) )
  127.         
  128.         dwNewTimeInterval = CDbl( GetFormStr( "timeInterval" ) )
  129.         dwNewFileSize = 0
  130.         bUseBuffering = CBool( 0 = StrComp( "buffer", strLocCache, vbTextCompare ) )
  131.         bUseUnicode = CBool( 0 = StrComp( "unicode", strEncoding, vbTextCompare ) )
  132.         dwLoggedEvents = CInt( g_objPluginAdmin.LoggedEvents )
  133.         dwNewLoggedEvents = 0
  134.  
  135.         ' Calc the max file size
  136.         Dim dwFileSize
  137.         dwFileSize = CDbl( RemoveDangerousCharacters( GetFormStr("fileSize") ) )
  138.         if( 0 = Len( dwFileSize ) ) then
  139.             dwFileSize = 0
  140.         end if
  141.         dwNewFileSize = CDbl( dwFileSize )
  142.         if( 0 >= dwNewFileSize ) then
  143.             err.number = -1
  144.             Session( "ErrorDescription" ) = Server.HTMLEncode( L_INVALIDLOGSIZE_TEXT )
  145.             Session( "ErrorNumber" ) = CDbl( Err.Number )
  146.             Session( "ErrorCulprit" ) = "cycle"
  147.             Exit Do
  148.         end if
  149.  
  150.         if( 0 < dwNewFileSize ) then
  151.             if( g_objPluginAdmin.MaxSize <> dwNewFileSize ) and ( 0 < dwNewFileSize ) then
  152.                 g_objPluginAdmin.MaxSize = dwNewFileSize
  153.                 bCycleTheLogFile = TRUE
  154.             end if
  155.             if 0 <> err.number then
  156.                 Session( "ErrorDescription" ) = Server.HTMLEncode( Err.description )
  157.                 Session( "ErrorNumber" ) = CInt( Err.Number )
  158.                 Session( "ErrorCulprit" ) = "size"
  159.                 Exit Do
  160.             end if
  161.         end if
  162.  
  163.         if( g_objPluginAdmin.Cycle <> dwNewTimeInterval ) then
  164.             g_objPluginAdmin.Cycle = dwNewTimeInterval
  165.             bCycleTheLogFile = TRUE
  166.             err.clear
  167.         end if
  168.  
  169.         if ErrorDetected( "cycle" ) then
  170.             Exit Do
  171.         end if
  172.  
  173.         if( 0 <> Len( GetFormStr( "ReqClientLogs") ) ) then
  174.             bRequestClientLogs = TRUE
  175.         end if
  176.         if( 0 <> Len( GetFormStr( "ReqRemClientLogs") ) ) then
  177.             bRequestRemClientLogs = TRUE
  178.         end if
  179.         if( 0 <> Len( GetFormStr( "SavePlayerLog") ) ) then
  180.             bSavePlayerLog = TRUE
  181.         end if
  182.         if( 0 <> Len( GetFormStr( "SaveDistLog") ) ) then
  183.             bSaveDistLog = TRUE
  184.         end if
  185.         if( 0 <> Len( GetFormStr( "UseRole") ) ) then
  186.             bUseRole = TRUE
  187.         end if
  188.         
  189.         if( bRequestClientLogs ) then
  190.             dwNewLoggedEvents = dwNewLoggedEvents or WMS_LOG_EVENT_LOCAL
  191.         end if
  192.         if( bRequestRemClientLogs ) then
  193.             dwNewLoggedEvents = dwNewLoggedEvents or WMS_LOG_EVENT_REMOTE
  194.         end if
  195.         if( bSavePlayerLog ) then
  196.             dwNewLoggedEvents = dwNewLoggedEvents or WMS_LOG_EVENT_PLAYER
  197.         end if
  198.         if( bSaveDistLog ) then
  199.             dwNewLoggedEvents = dwNewLoggedEvents or WMS_LOG_EVENT_DISTRIBUTION
  200.         end if
  201.         if( bUseRole ) then
  202.             dwNewLoggedEvents = dwNewLoggedEvents or WMS_LOG_EVENT_FILTER_ON_ROLE
  203.         end if
  204.         
  205.         if( dwLoggedEvents <> dwNewLoggedEvents ) then
  206.             g_objPluginAdmin.LoggedEvents = dwNewLoggedEvents
  207.             dwLoggedEvents = dwNewLoggedEvents
  208.             bCycleTheLogFile = TRUE
  209.         end if
  210.         
  211.         if( bUseRole ) then
  212.             g_objPluginAdmin.RoleFilter = RemoveSpecifiedChars( strRole, REGEXP_DANGEROUS_ROLE_CHARS )
  213.         end if
  214.  
  215.         if ErrorDetected( "logOptions" ) then
  216.             Exit Do
  217.         end if
  218.  
  219.         if "utc" = GetFormStr( "timeFormat") then
  220.             if( TRUE = g_objPluginAdmin.UseLocalTime ) then
  221.                 g_objPluginAdmin.UseLocalTime = FALSE
  222.                 bCycleTheLogFile = TRUE
  223.             end if
  224.         elseif "local" = GetFormStr( "timeFormat") then
  225.             if( FALSE = g_objPluginAdmin.UseLocalTime ) then
  226.                 g_objPluginAdmin.UseLocalTime = TRUE
  227.                 bCycleTheLogFile = TRUE
  228.             end if
  229.         end if    
  230.         
  231.         if( 0 = StrComp( "new", GetFormStr( "logformat" ), vbTextCompare ) ) then
  232.             g_objPluginAdmin.V4Compat = FALSE
  233.         else
  234.             g_objPluginAdmin.V4Compat = TRUE
  235.         end if
  236.  
  237.         if( ErrorDetected( "logformat" ) ) then
  238.             Exit Do
  239.         end if
  240.  
  241.         if( "" <> GetFormStr( "logcache") ) then    
  242.             if( bUseBuffering <> g_objPluginAdmin.UseBuffering ) then
  243.                 g_objPluginAdmin.UseBuffering = bUseBuffering
  244.                 bCycleTheLogFile = TRUE
  245.             end if
  246.         end if
  247.             
  248.         if( 0 < Len( GetFormStr( "encoding" ) ) ) then
  249.             if( bUseUnicode <> g_objPluginAdmin.UseUnicode ) then
  250.                 g_objPluginAdmin.UseUnicode = bUseUnicode
  251.                 bCycleTheLogFile = TRUE
  252.             end if
  253.         end if
  254.         
  255.         bCycleTheLogFile = TRUE
  256.   
  257.         if( ErrorDetected( "Set" ) ) then
  258.             Exit Do
  259.         end if
  260.     
  261.     Loop Until TRUE
  262.  
  263.     if( bCycleTheLogFile ) then
  264.         g_objPluginAdmin.CycleNow
  265.     end if
  266.  
  267.     if( 0 <> err.number ) then
  268.         Session( "PageReloadedToDisplayError" ) = TRUE
  269.         dwSavedErrNum = err.number
  270.         szSavedErrDesc = err.Description
  271.     else
  272.         if "" <> g_strEncodedPubPointName then
  273.             Response.Redirect "../pubpoints/pubpoint_props.asp?server=" & g_strQueryStringServer & "&ppID=" & g_strPubPointID & "&category=" & g_strCategory & "&pluginIndex=" & qs("pluginIndex")
  274.         else
  275.             Response.Redirect "../server_props.asp?server=" & g_strQueryStringServer & "&category=" & g_strCategory & "&pluginIndex=" & qs("pluginIndex")
  276.         end if
  277.         Response.Flush
  278.         Response.End
  279.     end if    
  280. end if
  281.  
  282. strTemplate = GetFormStr( "LogFileTemplate" )
  283. strTemplate = strTemplate
  284. strTemplate = RemoveSpecifiedChars( strTemplate, REGEXP_ILLEGAL_TEMPL_CHARS )
  285.  
  286. ' read from the plugin, overriding with user changes
  287. dwLoggedEvents = g_objPluginAdmin.LoggedEvents
  288.  
  289. if( 0 = Len( strOp ) ) then ' initial load
  290.     if( WMS_LOG_EVENT_LOCAL and dwLoggedEvents ) then
  291.         bRequestClientLogs = TRUE
  292.     end if
  293.  
  294.     if( WMS_LOG_EVENT_REMOTE and dwLoggedEvents ) then
  295.         bRequestRemClientLogs = TRUE
  296.     end if
  297.  
  298.     if( WMS_LOG_EVENT_PLAYER and dwLoggedEvents ) then
  299.         bSavePlayerLog = TRUE
  300.     end if
  301.  
  302.     if( WMS_LOG_EVENT_DISTRIBUTION and dwLoggedEvents ) then
  303.         bSaveDistLog = TRUE
  304.     end if
  305.     
  306.     if( WMS_LOG_EVENT_FILTER_ON_ROLE and dwLoggedEvents ) then
  307.         bUseRole = TRUE
  308.     end if
  309. else    ' cycle or preview path
  310.     if( 0 < Len( GetFormStr( "ReqClientLogs" ) ) ) then
  311.         bRequestClientLogs = TRUE
  312.     end if
  313.  
  314.     if( 0 < Len( GetFormStr( "ReqRemClientLogs" ) ) )  then
  315.         bRequestRemClientLogs = TRUE
  316.     end if
  317.  
  318.     if( 0 < Len( GetFormStr( "SavePlayerLog" ) ) ) then
  319.         bSavePlayerLog = TRUE
  320.     end if
  321.  
  322.     if( 0 < Len( GetFormStr( "SaveDistLog" ) ) ) then
  323.         bSaveDistLog = TRUE
  324.     end if
  325. end if
  326.     
  327. if ( 0 < Len( GetFormStr( "expandNow" ) ) ) then
  328. '        g_objPluginAdmin.CycleNow()
  329.     if Err.number <> 0 then
  330.     end if
  331. end if
  332.  
  333.  
  334. WriteHTMLHeader( g_strDecodedServerName ) 
  335. %>
  336. <link rel="stylesheet" type="text/css" href="<%= Session( "cssName" ) %>">
  337. <% WritePluginJSUtils %>
  338. <script language="JavaScript">
  339. <!--
  340. /*@cc_on @*/
  341.  
  342. var g_bAlertedUserToInvalidFileSize = false;
  343. var g_bAlertedUserToInvalidLogPath = false;
  344.  
  345. ////////////////////////////////////////////////////////////////////
  346. function ValidateDirectory()
  347. {
  348.     <% jsTRY %>
  349.         var bEnableOkay = true;
  350.         var szUnfiltered = new String( document.pluginForm.LogFileTemplate.value );
  351.         var szFiltered = "";
  352.         
  353.         // perform left trim
  354.         szUnfiltered = szUnfiltered.replace( /^\s+/, "" );
  355.  
  356.         // perform right trim
  357.         szUnfiltered = szUnfiltered.replace( /\s+$/, "" );
  358.         
  359.         if( 0 == szUnfiltered.length )
  360.         {
  361.             return( false );
  362.         }
  363.         
  364.         if( bEnableOkay )
  365.         {
  366.             szFiltered = szUnfiltered.replace( /\`|\'|!|@|#|\^|\&|\||{|}|;|\?|\"/g, "" );
  367.             if( szUnfiltered != szFiltered )
  368.             {
  369.                 bEnableOkay = false;
  370.             }
  371.         }
  372.         
  373.         if( bEnableOkay )
  374.         {
  375.             document.pluginForm.LogFileTemplate.style.color = "#000000";
  376.             return( true );
  377.         }
  378.         else
  379.         {
  380.             document.pluginForm.LogFileTemplate.style.color = "#ff0000";
  381.             if( ( 0 < szUnfiltered.length ) && ! g_bAlertedUserToInvalidLogPath )
  382.             {
  383.                 g_bAlertedUserToInvalidLogPath = true;
  384.                 window.alert( "<%= Server.HTMLEncode( L_INVALIDLOGPATH_TEXT ) %>" );
  385.             }
  386.             return( false );
  387.         }
  388.     <% jsCATCH %>
  389. }
  390.  
  391. ////////////////////////////////////////////////////////////////////
  392. function DoExpandNow()
  393. {
  394.     <% jsTRY %>
  395.         var bFired;
  396.         document.pluginForm.expanded.value="TRUE";
  397.         document.pluginForm.formHistory.value="expand";
  398.         <% if brMSIE = g_dwBrowserType then %>
  399.         bFired = document.pluginForm.ok.fireEvent( "onclick" );
  400.         <% else %>
  401. //        document.pluginForm.ok.click();
  402.         <% end if %>
  403.     <% jsCATCH %>
  404. }
  405.  
  406. ////////////////////////////////////////////////////////////////////
  407. function DoApply( caller )
  408. {
  409.     <% jsTRY %>
  410.         var bFired;
  411.         document.pluginForm.formHistory.value="apply";
  412. //        bFired = document.pluginForm.ok.fireEvent( "onclick" );
  413. //    document.pluginForm.submit();
  414.     <% jsCATCH %>
  415. }
  416.  
  417. ////////////////////////////////////////////////////////////////////
  418. function DoCycleNow( caller )
  419. {
  420.     <% jsTRY %>
  421.         var bFired;
  422.         document.pluginForm.formHistory.value="cycle";
  423.         <% if brMSIE = g_dwBrowserType then %>
  424.         bFired = document.pluginForm.ok.fireEvent( "onclick" );
  425.         <% else %>
  426. //        document.pluginForm.ok.click();
  427.         <% end if %>
  428. //    document.pluginForm.submit();
  429.     <% jsCATCH %>
  430. }
  431.  
  432. ////////////////////////////////////////////////////////////////////
  433. function ResetForm()
  434. {
  435.     <% jsTRY %>
  436.         document.pluginForm.formHistory.value="";
  437.     <% jsCATCH %>
  438. }
  439.  
  440. ////////////////////////////////////////////////////////////////////
  441. function ToggleFileSizeRadioButtons( dwWhichButton )
  442. {
  443.     <% jsTRY %>
  444.         if( 4 != dwWhichButton )
  445.         {
  446.             return;
  447.         }
  448.  
  449.         document.pluginForm.timeInterval[0].checked = ( 0 == dwWhichButton ) ? true : false;
  450.         document.pluginForm.timeInterval[1].checked = ( 1 == dwWhichButton ) ? true : false;
  451.         document.pluginForm.timeInterval[2].checked = ( 2 == dwWhichButton ) ? true : false;
  452.         document.pluginForm.timeInterval[3].checked = ( 3 == dwWhichButton ) ? true : false;
  453.         document.pluginForm.timeInterval[4].checked = ( 4 == dwWhichButton ) ? true : false;
  454.         document.pluginForm.timeInterval[5].checked = ( 5 == dwWhichButton ) ? true : false;
  455.         
  456. //        document.pluginForm.fileSize.disabled = ! document.pluginForm.timeInterval[4].checked;
  457.     <% jsCATCH %>
  458. }
  459.  
  460. ////////////////////////////////////////////////////////////////////
  461. function CheckOptions()
  462. {
  463.     <% jsTRY %>
  464.         var bEnableSaveOptions = true;
  465.         bEnableSaveOptions = document.pluginForm.ReqClientLogs.checked || document.pluginForm.ReqRemClientLogs.checked;
  466.         
  467.         document.pluginForm.SavePlayerLog.disabled = ! bEnableSaveOptions;
  468.         document.pluginForm.SaveDistLog.disabled = ! bEnableSaveOptions;
  469.         
  470.         UpdatePlayerStatsCheckboxes();
  471.     <% jsCATCH %>
  472. }
  473.  
  474.  
  475. ////////////////////////////////////////////////////////////////////
  476. function WarnIfNothingToBeLogged()
  477. {
  478.     <% jsTRY %>
  479.         var bWarn = true;
  480.         bWarn = ( ! document.pluginForm.ReqClientLogs.checked ) && ( ! document.pluginForm.ReqRemClientLogs.checked );
  481.         
  482.         if( bWarn )
  483.         {
  484.             window.alert( "<%= RemoveDangerousCharacters( L_LOGNOTHINGWARN_TEXT ) %>" );
  485.         }
  486.     <% jsCATCH %>
  487. }
  488.  
  489. ////////////////////////////////////////////////////////////////////
  490. function CheckRole()
  491. {
  492.     <% jsTRY %>
  493.         if( ( false == document.pluginForm.UseRole.checked ) || document.pluginForm.role.disabled )
  494.         {
  495.             return( true );
  496.         }
  497.         
  498.         document.pluginForm.role.disabled = false;
  499.         
  500.         var szRole = document.pluginForm.role.value;
  501.         var dwLenRole = szRole.length;
  502.         szRole = szRole.replace( /\<|\>|\;|\(|\)|\&/g, "" );
  503.  
  504.         if( dwLenRole != szRole.length )
  505.         {
  506.             document.pluginForm.ok.disabled = true;
  507.             document.pluginForm.role.style.color="#FF0000";
  508.             return( false );
  509.             document.pluginForm.role.value = szRole;
  510.         }
  511.         else
  512.         {
  513.             document.pluginForm.role.style.color="#000000";
  514.         }
  515.         
  516. //        szRole = szRole.replace( /(\s)+/g, "" );
  517.         return( szRole.length > 0 );
  518.     <% jsCATCH %>
  519. }
  520.  
  521. ////////////////////////////////////////////////////////////////////
  522. function CheckFileSize()
  523. {
  524.     <% jsTRY %>
  525.         if( ! document.pluginForm.timeInterval[4].checked ) 
  526.         {
  527.             return( true );
  528.         }
  529.         
  530.         document.pluginForm.fileSize.disabled = false;
  531.         var bValidInput = true;
  532.         var bDisableOKButtons = false;
  533.         
  534.         var szFileSize = document.pluginForm.fileSize.value;
  535.         if( 0 == szFileSize.length )
  536.         {
  537.             return( false );
  538.         }
  539.         
  540.         if( isNaN( szFileSize ) )
  541.         {
  542.             bDisableOKButtons = true;
  543.             bValidInput = ! ( 0 < szFileSize.length );
  544.         }
  545.         else
  546.         {
  547.             dwFileSize = parseInt( szFileSize );
  548.             if( 0 >= dwFileSize )
  549.             {
  550.                 bValidInput = false;
  551.                 bDisableOKButtons = ( 0 == dwFileSize );
  552.             }
  553.         }
  554.         
  555.         if( ! bValidInput )
  556.         {
  557.             document.pluginForm.fileSize.style.color="#ff0000";
  558.             if( 0 < szFileSize.length && ( ! g_bAlertedUserToInvalidFileSize ) )
  559.             {
  560.                 g_bAlertedUserToInvalidFileSize = true;
  561.                 window.alert( "<%= RemoveDangerousCharacters( L_INVALIDLOGSIZE_TEXT ) %>" );
  562.             }
  563.             else
  564.             {
  565.                 window.status = "<%= RemoveDangerousCharacters( L_INVALIDLOGSIZE_TEXT ) %>";
  566.             }
  567.         }
  568.         else
  569.         {
  570.             window.status = "";
  571.             document.pluginForm.fileSize.style.color="#000000";
  572.         }
  573.         
  574.         bValidInput = bValidInput && ( ! bDisableOKButtons );
  575.         return( bValidInput );
  576.  
  577.     <% jsCATCH %>
  578. }
  579.  
  580. ////////////////////////////////////////////////////////////////////
  581. function UpdateButtonStates()
  582. {
  583.     <% jsTRY %>
  584.         var bAggregateInputIsOkay = false;
  585.         
  586.         bAggregateInputIsOkay = ValidateDirectory();
  587.         bAggregateInputIsOkay = CheckFileSize() && bAggregateInputIsOkay;
  588.         bAggregateInputIsOkay = CheckRole() && bAggregateInputIsOkay;
  589.         
  590.         document.pluginForm.ok.disabled = ! bAggregateInputIsOkay;
  591.         document.pluginForm.expand.disabled = ! bAggregateInputIsOkay;
  592.         document.pluginForm.cycle.disabled = ! bAggregateInputIsOkay;
  593.     <% jsCATCH %>
  594. }
  595.  
  596. ////////////////////////////////////////////////////////////////////
  597. function UpdatePlayerStatsCheckboxes()
  598. {
  599.     <% jsTRY %>
  600.         var bPlayerStatsChecked
  601.         var bUseRoleChecked
  602.         
  603.         bUseRoleChecked = false;
  604.         
  605.         bPlayerStatsChecked = document.pluginForm.SavePlayerLog.checked;
  606.         if( true == bPlayerStatsChecked )
  607.         {
  608.             bUseRoleChecked = document.pluginForm.UseRole.checked;
  609.         }
  610.  
  611.         document.pluginForm.UseRole.disabled = ! bPlayerStatsChecked;
  612.         document.pluginForm.role.disabled = ! bUseRoleChecked;
  613.     <% jsCATCH %>
  614. }
  615. -->
  616. </script>
  617. </head>
  618. <body class="pluginBody" onLoad="JavaScript:ResetForm();CheckOptions();UpdateButtonStates();" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0" width="90%" oncontextmenu="JavaScript:event.cancelBubble=true;return false;">
  619. <% DrawPluginBanner %>
  620. <!--
  621. <table border=0>
  622. <tr><td width=50% valign=top>
  623. -->
  624. <table border=0>
  625. <tr>
  626.     <td valign=top> 
  627.         <% WriteStdPluginForm %>
  628.         <input
  629.             type="hidden"
  630.             name="formHistory"
  631.             id="formHistory"
  632.             value="<%= RemoveDangerousCharacters( GetFormStr( "formHistory" ) ) %>" >
  633.         <input
  634.             type="hidden"
  635.             name="expanded"
  636.             id="expanded"
  637.             value="<%= RemoveDangerousCharacters( GetFormStr( "expanded" ) ) %>" >
  638.         <table cellspacing="0" border="0" width="100%" class="propgroupbox">
  639.         <caption align="left" class="pluginGroupHeader"><% RenderWithErrorCheck Server.HTMLEncode( L_DIRECTORY_TEXT ), "template" %></caption>
  640.         <tr>
  641.             <td>
  642.                 <br>
  643.                 <div class="defaultcursor" ><%= Server.HTMLEncode( L_LOGGINGHELP_TEXT ) %></div><br>
  644.         </tr>
  645.         <tr>
  646.             <td>
  647.                 <input 
  648.                     type="text" 
  649.                     name="LogFileTemplate" 
  650.                     value="<%
  651.                 if( 0 = Len( strTemplate ) ) then
  652.                     strTemplate = RemoveSpecifiedChars( GetFormStr( "LogFileTemplate" ), REGEXP_ILLEGAL_TEMPL_CHARS )
  653.                     if 0 = Len( strTemplate ) then
  654.                         strTemplate = RemoveSpecifiedChars( g_objPluginAdmin.Template, REGEXP_ILLEGAL_TEMPL_CHARS )
  655.                     end if 
  656.                 end if
  657.                 Response.Write( Server.HTMLEncode( strTemplate ) )
  658.                 %>"
  659.                     size="70"
  660.                     maxlength="<%= Server.HTMLEncode( MAX_PATH ) %>"
  661.                     tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
  662.                     onChange="JavaScript:UpdateButtonStates();"
  663.                     onKeyDown="JavaScript:UpdateButtonStates();"
  664.                     onKeyUp="JavaScript:UpdateButtonStates();"
  665.                     onPaste="JavaScript:UpdateButtonStates();"
  666.                 >
  667.                 <input 
  668.                     type="submit"
  669.                     hidefocus="true"
  670.                     name="expand" 
  671.                     id="expand" 
  672.                     value="<%= Server.HTMLEncode( L_VERIFYPATHBUTTON_TEXT ) %>" 
  673.                     size="30"
  674.                     tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %> 
  675.                     onClick="JavaScript:DoExpandNow();" >
  676.                 <%
  677.                 if( ( 0 = StrComp( "TRUE", GetFormStr( "expanded" ) ) ) or ( 0 < Len( GetFormStr( "expand" ) ) ) ) then %>
  678.                     <div class="defaultcursor" >
  679.                         <br>
  680.                         <kbd>
  681.                             <%
  682.                             on error resume next
  683.                             strExpandedTemplate = g_objPluginAdmin.ExpandTemplate( strTemplate )
  684.                             if( 0 = Len( strExpandedTemplate ) ) then
  685.                                 if( 0 < Len( strTemplate ) ) then
  686.                                     strExpandedTemplate = err.Description
  687.                                 end if
  688.                             end if
  689.                             Response.Write( Server.HTMLEncode( strExpandedTemplate ) )
  690. '                            strExpandedTemplate = nothing
  691.                               %>
  692.                         </kbd>
  693.                         <br>
  694.                     </div><%
  695.                 end if 
  696.                 %>
  697.             </td>
  698.         </tr>
  699.         </table>
  700.         <br>
  701.         <table cellspacing="0" border="0" width="100%" class="propgroupbox" cellspacing="0" cellpadding=0>
  702.         <caption align="left" class="pluginGroupHeader"><% RenderWithErrorCheck Server.HTMLEncode( L_LOGCYCLE_TEXT ), "cycle" %></caption>
  703.         <tr>
  704.             <td colspan=2>
  705.                 <br>
  706.                 <div class="defaultcursor" ><%= Server.HTMLEncode( L_LOGCYCLEHELP_TEXT ) %></div>
  707.                 <br>
  708.             </td>
  709.         </tr>
  710.         <tr>
  711.             <td>
  712.               <input 
  713.                 type="radio" 
  714.                 name="timeInterval" 
  715.                 value="<%= Server.HTMLEncode( WMS_LOG_CYCLE_HOUR ) %>" 
  716.                 ID="time_hour" 
  717.                 tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %> <%
  718.                 if( 0 < Len( GetFormStr("timeInterval" ) ) ) then
  719.                     if( 0 = StrComp( "5", GetFormStr("timeInterval"), vbTextCompare ) ) then
  720.                         Response.Write( " checked " ) 
  721.                     end if
  722.                 elseif _
  723.                       5 = g_objPluginAdmin.Cycle then
  724.                     Response.Write(" checked ")
  725.                 end if
  726.                 %> 
  727.                 onFocus="JavaScript:ToggleFileSizeRadioButtons( 0 );" 
  728.                 > <label for="time_hour" class="handcursor"><%= Server.HTMLEncode( L_HOURLY_TEXT ) %></label>
  729.             </td>
  730.             <td align="right">
  731.                  
  732.             </td>
  733.         </tr>
  734.         <tr>
  735.             <td>
  736.               <input 
  737.                 type="radio" 
  738.                 name="timeInterval" 
  739.                 value="<%= Server.HTMLEncode( WMS_LOG_CYCLE_DAY ) %>" 
  740.                 ID="time_day" 
  741.                 tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %> <%
  742.                 if( 0 < Len( GetFormStr("timeInterval" ) ) ) then
  743.                     if( 0 = StrComp( "4", GetFormStr("timeInterval"), vbTextCompare ) ) then
  744.                         Response.Write( " checked " ) 
  745.                     end if
  746.                 elseif _
  747.                       4 = g_objPluginAdmin.Cycle then
  748.                     Response.Write(" checked ")
  749.                 end if
  750.                 %> 
  751.                 onFocus="JavaScript:ToggleFileSizeRadioButtons( 1 );" 
  752.                 > <label for="time_day" class="handcursor"><%= Server.HTMLEncode( L_DAILY_TEXT ) %></label>
  753.             </td>
  754.             <td align="right">
  755.                  
  756.             </td>
  757.         </tr>
  758.         <tr>
  759.             <td>
  760.               <input 
  761.                 type="radio" 
  762.                 name="timeInterval" 
  763.                 value="<%= Server.HTMLEncode( WMS_LOG_CYCLE_WEEK ) %>" 
  764.                 ID="time_week" 
  765.                 tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %> <%
  766.                 if( 0 < Len( GetFormStr("timeInterval" ) ) ) then
  767.                     if( 0 = StrComp( "3", GetFormStr("timeInterval"), vbTextCompare ) ) then
  768.                         Response.Write( " checked " ) 
  769.                     end if
  770.                 elseif _
  771.                       3 = g_objPluginAdmin.Cycle then
  772.                     Response.Write(" checked ")
  773.                 end if
  774.                 %> 
  775.                 onFocus="JavaScript:ToggleFileSizeRadioButtons( 2 );" 
  776.                 > <label for="time_week" class="handcursor"><%= Server.HTMLEncode( L_WEEKLY_TEXT ) %></label>
  777.             </td>
  778.             <td align="right">
  779.                  
  780.             </td>
  781.         </tr>
  782.         <tr>
  783.             <td>
  784.               <input 
  785.                 type="radio" 
  786.                 name="timeInterval" 
  787.                 value="<%= Server.HTMLEncode( WMS_LOG_CYCLE_MONTH ) %>" 
  788.                 ID="time_month" 
  789.                 tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %> <%
  790.                 if( 0 < Len( GetFormStr("timeInterval" ) ) ) then
  791.                     if( 0 = StrComp( "2", GetFormStr("timeInterval"), vbTextCompare ) ) then
  792.                         Response.Write( " checked " ) 
  793.                     end if
  794.                 elseif _
  795.                       2 = g_objPluginAdmin.Cycle then
  796.                     Response.Write(" checked ")
  797.                 end if
  798.                 %> 
  799.                 onFocus="JavaScript:ToggleFileSizeRadioButtons( 3 );" 
  800.                 > <label for="time_month" class="handcursor"><%= Server.HTMLEncode( L_MONTHLY_TEXT ) %></label>
  801.             </td>
  802.             <td align="right">
  803.                  
  804.             </td>
  805.         </tr>
  806.         <tr>
  807.             <td>
  808.               <input 
  809.                 type="radio" 
  810.                 name="timeInterval" 
  811.                 id="time_size" 
  812.                 onChange="JavaScript:UpdateButtonStates();"
  813.                 onPaste="JavaScript:UpdateButtonStates();"
  814.                 onKeyDown="JavaScript:UpdateButtonStates();"
  815.                 onKeyUp="JavaScript:UpdateButtonStates();"
  816.                 value="<%= Server.HTMLEncode( WMS_LOG_CYCLE_SIZE ) %>" 
  817.                 tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %> <%
  818.                 if( 0 < Len( GetFormStr("timeInterval" ) ) ) then
  819.                     if( 0 = StrComp( "1", GetFormStr("timeInterval"), vbTextCompare ) ) then
  820.                         Response.Write( " checked " ) 
  821.                     end if
  822.                 elseif WMS_LOG_CYCLE_SIZE = g_objPluginAdmin.Cycle then
  823.                     Response.Write(" checked ")
  824.                 end if
  825.                 %> 
  826.                 onFocus="JavaScript:document.pluginForm.fileSize.disabled = false;ToggleFileSizeRadioButtons( 4 );" 
  827.                 > <label for="time_size" class="handcursor"><% RenderWithErrorCheck Server.HTMLEncode( L_WHENFILESIZEREACHES_TEXT ), "size" %></label>
  828.                    <input 
  829.                     type="text" 
  830.                     name="fileSize" 
  831.                     value="<%
  832.                     if( 0 = Len( GetFormStr("fileSize") ) )then
  833.                         Response.Write( RemoveDangerousCharacters( g_objPluginAdmin.MaxSize ) )
  834.                     else
  835.                         Response.Write( Server.HTMLEncode( GetFormStr( "fileSize" ) ) )
  836.                     end if %>"
  837.                     tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %> 
  838.                     size="4"
  839.                     onKeyUp="JavaScript:UpdateButtonStates();"
  840.                     onKeyDown="JavaScript:ToggleFileSizeRadioButtons( 4 );UpdateButtonStates();"
  841.                     onChange="JavaScript:ToggleFileSizeRadioButtons( 4 );UpdateButtonStates();"
  842.                     onPaste="JavaScript:ToggleFileSizeRadioButtons( 4 );UpdateButtonStates();"
  843.                     maxlength="6">
  844.                     </span>
  845.             </td>
  846.             <td align="right">
  847.                  
  848.             </td>
  849.         </tr>
  850.         <tr>
  851.             <td>
  852.               <input type="radio" name="timeInterval" value="<%= Server.HTMLEncode( WMS_LOG_CYCLE_NONE ) %>" id="time_never" tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %> <%
  853.                 if( 0 < Len( GetFormStr("timeInterval" ) ) ) then
  854.                     if( 0 = StrComp( "0", GetFormStr("timeInterval"), vbTextCompare ) ) then
  855.                         Response.Write( " checked " ) 
  856.                     end if
  857.                 elseif _
  858.                       0 = g_objPluginAdmin.Cycle then
  859.                     Response.Write(" checked ")
  860.                 end if
  861.                 %> 
  862.                 onFocus="JavaScript:ToggleFileSizeRadioButtons( 5 );"
  863.                 > <label for="time_never" class="handcursor"><%= Server.HTMLEncode( L_NEVER_TEXT ) %></label>
  864.             </td>
  865.             <td>
  866.                   
  867.             </td>
  868.  
  869.         </tr>
  870.         </table><br>
  871.         <table cellspacing="0" border="0" width="100%" class="propgroupbox">
  872.         <caption align="left" class="pluginGroupHeader"><%= Server.HTMLEncode( L_LOGGINGINFO_TEXT ) %></caption>
  873.         <tr>
  874.             <td>
  875.                 <br>
  876.                 <div class="helptext" ><%= Server.HTMLEncode( L_CYCLENOWHELP_TEXT ) %></div><br>        
  877.                 <input type="submit"
  878.                        hidefocus="true"
  879.                        name="cycle"
  880.                        value="<%= Server.HTMLEncode( L_CYCLENOWBUTTON_TEXT ) %>" 
  881.                        tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
  882.                        onClick="JavaScript:DoCycleNow( this );">
  883.             </td>
  884.         </tr>
  885.         </table>
  886. <!--
  887.     </td>
  888. </tr>
  889. -->
  890. <!-- </table>
  891. -->
  892. <!--        
  893.     </td>
  894.     <td width=50% valign=top>
  895. -->
  896. <!------------------------------------------------------------------------------------------
  897.   Advanced
  898.   ------------------------------------------------------------------------------------------>
  899. <!-- <table cellspacing="0" border="0" width="90%">
  900. -->
  901. <!--
  902. <tr>
  903.     <td valign=top> 
  904. -->
  905.         <br>
  906.         <table cellspacing="0" border="0" width="100%" class="propgroupbox">
  907.         <caption align="left" class="pluginGroupHeader"><%= Server.HTMLEncode( L_TIMEFORMAT_TEXT ) %></caption>
  908.         <tr><td>
  909.         <input type="radio" 
  910.                name="timeFormat" 
  911.                value="utc"
  912.                id="timeFormat_utc"
  913.                tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
  914.         <%
  915.         if( 0 = StrComp( "utc", GetFormStr("timeFormat" ), vbTextCompare ) ) then
  916.             Response.Write( " checked " ) 
  917.         elseif ( 0 <> StrComp( "local", GetFormStr("timeformat"), vbTextCompare ) ) and ( not g_objPluginAdmin.UseLocalTime ) then
  918.             Response.Write( " checked " ) 
  919.         end if
  920.         %> > 
  921.         <label for="timeFormat_utc" class="handcursor"><%= Server.HTMLEncode( L_USEUTC_TEXT ) %></label><br>
  922.         <input type="radio" 
  923.                name="timeFormat" 
  924.                value="local"
  925.                id="timeFormat_local"
  926.                tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
  927.         <% 
  928.         if( 0 = StrComp( "local", GetFormStr("timeFormat" ), vbTextCompare ) ) then
  929.             Response.Write( " checked " ) 
  930.         elseif ( 0 <> StrComp( "utc", GetFormStr("timeformat"), vbTextCompare ) ) and ( g_objPluginAdmin.UseLocalTime ) then
  931.             Response.Write( " checked " ) 
  932.         end if
  933.         %> > 
  934.         <label for="timeFormat_local" class="handcursor"><%= Server.HTMLEncode( L_USELOCALTIME_TEXT ) %></label><br>
  935.         </td></tr></table>
  936.         <br>
  937.         <table cellspacing="0" border="0" width="100%" class="propgroupbox">
  938.         <caption align="left" class="pluginGroupHeader"><%= Server.HTMLEncode( L_LOGCACHE_TEXT ) %></caption>
  939.         <tr><td>
  940.         <input type="radio" 
  941.                name="logcache"
  942.                value="buffer"
  943.                id="logcache_buffer"
  944.                tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
  945.         <%
  946.         if( 0 < Len( GetFormStr("logCache" ) ) ) then
  947.             if( 0 = StrComp( "buffer", GetFormStr("logCache"), vbTextCompare ) ) then
  948.                 Response.Write( " checked " ) 
  949.             end if
  950.         elseif _
  951.               True = g_objPluginAdmin.UseBuffering then
  952.             Response.Write(" checked ")
  953.         end if
  954.         %> >
  955.         <label for="logcache_buffer" class="handcursor"><%= Server.HTMLEncode( L_BUFFERLOGENTRIES_TEXT ) %></label><br>
  956.  
  957.         <input type="radio" 
  958.                name="logcache"
  959.                value="writenow"
  960.                id="logcache_writenow"
  961.                tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
  962.         <%
  963.         if( 0 < Len( GetFormStr("logCache" ) ) ) then
  964.             if( 0 = StrComp( "writenow", GetFormStr("logCache"), vbTextCompare ) ) then
  965.                 Response.Write( " checked " ) 
  966.             end if
  967.         elseif _
  968.               False = g_objPluginAdmin.UseBuffering then
  969.             Response.Write(" checked ")
  970.         end if
  971.         %> >
  972.         <label for="logcache_writenow" class="handcursor"><%= Server.HTMLEncode( L_WRITELOGENTRIESIMMEDIATELY_TEXT ) %></label><br>
  973.         </td></tr></table>
  974.         <br>
  975.         <table cellspacing="0" border="0" width="100%" class="propgroupbox">
  976.         <caption align="left" class="pluginGroupHeader"><%= Server.HTMLEncode( L_TEXTENCODING_TEXT ) %></caption>
  977.         <tr><td>
  978.         <input type="radio" 
  979.                name="encoding"
  980.                value="unicode"
  981.                id="encoding_unicode"
  982.                tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
  983.         <%
  984.         if( 0 < Len( GetFormStr("encoding" ) ) ) then
  985.             if( 0 = StrComp( "unicode", GetFormStr("encoding"), vbTextCompare ) ) then
  986.                 Response.Write( " checked " ) 
  987.             end if
  988.         elseif _
  989.               True = g_objPluginAdmin.UseUnicode then
  990.             Response.Write(" checked ")
  991.         end if
  992.         %> > 
  993.         <label for="encoding_unicode" class="handcursor"><%= Server.HTMLEncode( L_USEUNICODECHARS_TEXT ) %></label><br>
  994.         <input type="radio" 
  995.                name="encoding"
  996.                value="ansi"
  997.                id="encoding_ansi"
  998.                tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
  999.         <%
  1000.         if( 0 < Len( GetFormStr("encoding" ) ) ) then
  1001.             if( 0 = StrComp( "ansi", GetFormStr("encoding"), vbTextCompare ) ) then
  1002.                 Response.Write( " checked " ) 
  1003.             end if
  1004.         elseif _
  1005.               False = g_objPluginAdmin.UseUnicode then
  1006.             Response.Write(" checked ")
  1007.         end if
  1008.         %> >
  1009.         <label for="encoding_ansi" class="handcursor"><%= Server.HTMLEncode( L_USEANSICHARS_TEXT )%></label><br>
  1010.         </td></tr></table>
  1011.         <br>
  1012.         <table cellspacing="0" border="0" width="100%" class="propgroupbox">
  1013.         <caption align="left" class="pluginGroupHeader"><% RenderWithErrorCheck Server.HTMLEncode( L_LOGFORMAT_TEXT ), "logformat" %></caption>
  1014.         <tr><td>
  1015.         <input type="radio"
  1016.                name="logformat"
  1017.                value="new"
  1018.                id="logformat_new"
  1019.                tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
  1020.         <%
  1021.         Dim strLogFormat
  1022.         Dim bCheckedNew
  1023.         bCheckedNew = FALSE
  1024.         strLogFormat = GetFormStr("logformat" )
  1025.         if( 0 < Len( strLogFormat ) ) then
  1026.             if( 0 = StrComp( "new", strLogFormat, vbTextCompare ) ) then
  1027.                 Response.Write( " checked " )
  1028.                 bCheckedNew = TRUE
  1029.             end if
  1030.         elseif( FALSE = g_objPluginAdmin.V4Compat ) then
  1031.             Response.Write(" checked ")
  1032.             bCheckedNew = TRUE
  1033.         end if
  1034.         %> >
  1035.         <label for="logformat_new" class="handcursor"><%= Server.HTMLEncode( L_WMSFORMATLOG_TEXT ) %></label><br>
  1036.         
  1037.         <input type="radio" 
  1038.                name="logformat"
  1039.                value="old"
  1040.                id="logformat_old"
  1041.                tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
  1042.         <%
  1043.         if( FALSE = bCheckedNew ) then
  1044.             Response.Write( " checked " ) 
  1045.         end if
  1046.         %> > 
  1047.         <label for="logformat_old" class="handcursor"><%= Server.HTMLEncode( L_LEGACYFORMATLOG_TEXT ) %></label><br>
  1048.         <span class="defaultcursor"> <table cellspacing=1 cellpadding=1 border=0><tr><td><img src="img/wmstip_32.gif" height="32" width="32"></td><td><%= L_RPTANALYSISTOOL_TEXT %></td></tr></table></span><br>
  1049.         </td></tr></table>
  1050.         <br>
  1051.         <table cellspacing="0" border="0" width="100%" class="propgroupbox">
  1052.         <caption align="left" class="pluginGroupHeader"><%= Server.HTMLEncode( L_LOGOPTIONS_TEXT ) %></caption>
  1053.         <tr><td>
  1054.         <br>
  1055.         <div class="helptext"><%= Server.HTMLEncode( L_LOGREQHEADER_TEXT ) %></div><br>
  1056.         <input type="checkbox"
  1057.                name="ReqClientLogs"
  1058.                onClick="JavaScript:CheckOptions();WarnIfNothingToBeLogged();"
  1059.                tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
  1060.         <%
  1061.         if bRequestClientLogs then
  1062.             Response.Write(" checked ")
  1063.         end if
  1064.         %> >
  1065.         <span class="handcursor" onClick="JavaScript:document.pluginForm.ReqClientLogs.checked = !document.pluginForm.ReqClientLogs.checked;CheckOptions();WarnIfNothingToBeLogged();"><%= L_LOGREQCLIENTLOGS_TEXT %></span><br>
  1066.         
  1067.         <input type="checkbox"
  1068.                name="ReqRemClientLogs"
  1069.                onClick="JavaScript:CheckOptions();WarnIfNothingToBeLogged();"
  1070.                tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
  1071.         <%
  1072.         if bRequestRemClientLogs then
  1073.             Response.Write(" checked ")
  1074.         end if
  1075.         %> > 
  1076.         <span class="handcursor" onClick="JavaScript:document.pluginForm.ReqRemClientLogs.checked = !document.pluginForm.ReqRemClientLogs.checked;CheckOptions();WarnIfNothingToBeLogged();"><%= L_LOGCLIENTREMOTE_TEXT %></span><br>
  1077.         </td>
  1078.         </tr>
  1079.         </table>
  1080.         
  1081.         <table cellspacing="0" border="0" width="100%" class="propgroupbox">
  1082.         <tr>
  1083.         <td>
  1084.         <br>
  1085.         <div class="helptext"><% RenderWithErrorCheck Server.HTMLEncode( L_LOGFILTOPTIONS_TEXT ), "logOptions" %></div><br>     
  1086.         
  1087.         <input type="checkbox"
  1088.                name="SavePlayerLog"
  1089.                tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
  1090.                onClick="JavaScript:UpdatePlayerStatsCheckboxes();"
  1091.         <%
  1092.         if bSavePlayerLog then
  1093.             Response.Write(" checked ")
  1094.         end if
  1095.         %> > 
  1096.         <span class="handcursor" onClick="JavaScript:document.pluginForm.SavePlayerLog.checked = !document.pluginForm.SavePlayerLog.checked;UpdatePlayerStatsCheckboxes();"><%= L_LOGPLAYER_TEXT %></span><br>
  1097.         
  1098.         <table cellpadding=2 cellspacing="0" border="0">
  1099.         <tr>
  1100.             <td>
  1101.                   
  1102.             </td>
  1103.             <td>
  1104.                 <input type="checkbox"
  1105.                        name="UseRole"
  1106.                        id="UseRoleCheckbox"
  1107.                        tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
  1108.                        onClick="JavaScript:UpdatePlayerStatsCheckboxes();UpdateButtonStates();"
  1109.                        onChange="JavaScript:UpdatePlayerStatsCheckboxes();UpdateButtonStates();"
  1110.                 <%
  1111.                 if( bUseRole or ( 0 <> Len( GetFormStr( "UseRole" ) ) ) ) then
  1112.                     Response.Write(" checked ")
  1113.                 end if
  1114.                 %> >
  1115.                 <label for="UseRoleCheckbox" class="handcursor"><%= Server.HTMLEncode( L_LOGSTATSWROLE_TEXT ) %></label><br>
  1116.             </td>
  1117.         </tr>
  1118.         <tr>
  1119.             <td>
  1120.                   
  1121.             </td>
  1122.             <td>
  1123.                    <input type="text" name="role" value="<%
  1124.                 Response.Write( RemoveSpecifiedChars( strRole, REGEXP_DANGEROUS_ROLE_CHARS ) )
  1125.                 %>" tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
  1126.                 <% if brMSIE <> g_dwBrowserType then %>
  1127.                 size="25"
  1128.                 <% else %>
  1129.                 size="40"
  1130.                 <% end if %>
  1131.                 maxlength="<%= Server.HTMLEncode( MAX_PATH ) %>"
  1132.                 onChange="JavaScript:UpdateButtonStates();"
  1133.                 onKeyDown="JavaScript:UpdateButtonStates();"
  1134.                 onKeyUp="JavaScript:UpdateButtonStates();"
  1135.                 onPaste="JavaScript:UpdateButtonStates();"
  1136.                 >
  1137.             </td>
  1138.         </tr>
  1139.         </table>
  1140.                 
  1141.         <input type="checkbox"
  1142.                name="SaveDistLog"
  1143.                tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>
  1144.         <%
  1145.         if bSaveDistLog then
  1146.             Response.Write(" checked ")
  1147.         end if
  1148.         %> > 
  1149.         <span class="handcursor" onClick="JavaScript:document.pluginForm.SaveDistLog.checked = !document.pluginForm.SaveDistLog.checked;"><%= Server.HTMLEncode( L_LOGDIST_TEXT ) %></span><br>
  1150.         </td></tr></table>
  1151.  
  1152. <!--
  1153.     </td>
  1154. </tr>
  1155. </table>
  1156. -->
  1157. </td></tr>
  1158. <tr>
  1159.     <td colspan=2>
  1160.         <br>
  1161.         <input type="submit" align="baseline" name="ok" value="<%= Server.HTMLEncode( L_OKAYBUTTON_TEXT ) %>" tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %> onClick="JavaScript:ResetForm();DoApply();">
  1162.         <input type="button" align="baseline" name="cancel" value="<%= Server.HTMLEncode( L_CANCELBUTTONSPACED_TEXT ) %>" onclick="JavaScript:Cancel();" tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>>
  1163.         <input type="button" align="baseline" name="help" onclick="JavaScript:DoPluginHelp( '<%= H_LOGGINGHELPTOPIC %>' )" value="<%= Server.HTMLEncode( L_HELPBUTTONSPACED_TEXT ) %>" id=help tabindex="<%= dwTabIndex %>" <% dwTabIndex = dwTabIndex + 1 %>>
  1164.     </td>
  1165. </tr>
  1166. </table>
  1167. </form>
  1168. <%
  1169. AlertUserWithPopupErrorDialog
  1170. if( 0 >= Len( GetFormStr( "formHistory" ) ) ) then
  1171.     OnErrorGoBack 
  1172. end if
  1173. %>
  1174. </body>
  1175. </html>
  1176. <%
  1177. LatchCurrentPage "plugins/LoggingAdmin.asp", qs
  1178. EndErrorHandling "LoggingAdmin.asp" 
  1179.  
  1180. on error resume next
  1181. PluginsASPCleanup
  1182. %>